package cn.ronghuanet.org.domain;

import cn.ronghuanet.base.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;


@Data
@AllArgsConstructor //全参构造
@NoArgsConstructor //无参构造
@ApiModel("部门类")//swagger实体类别名
public class Department extends BaseDomain {
    @ApiModelProperty("部门编号")
    private String sn;
    @ApiModelProperty("部门名称")
    private String name;
    @ApiModelProperty("部门的上级分类层级id")
    private String dirPath;
    @ApiModelProperty("部门状态 - 1启用，0禁用")
    private Integer state;
    @ApiModelProperty("部门管理员，关联Employee表id")
    private Long managerId;
    @ApiModelProperty("父级部门")
    private Long parentId;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("修改时间")
    private Date updateTime;
    @ApiModelProperty("管理员对象")
    private Employee manager;
    @ApiModelProperty("父级部门")
    private Department parent;

    @ApiModelProperty("子部门集合")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)//空就不要
    private List<Department> children=new ArrayList<Department>();

}
